#include"comm.hpp"
int main()
{

    cout<<"Client begin :"<<endl;
    int wfd=open(NAMED_PIPE,O_WRONLY);
    if(wfd<0) exit(1); //文件打开失败
    
    char buffer[1024];
     //write
    while(true)
    {
        cout<<"Please Say# ";
        fgets(buffer,sizeof(buffer),stdin);
        ssize_t n=write(wfd,buffer,strlen(buffer));
        assert(n==strlen(buffer));
        (void)n;

    }
   
    close(wfd);
    
    return 0;
}
